# -*- coding: utf-8 -*-

import requests
import uncurl


class __new_south_base__:

    def __query_uncurl_commit__(self):
        curl_command = '''
        curl 'http://10.10.80.215:9089/api/process-engine/commit_task?form_inst_id=8985&ins_proc_id=6327&ins_node_id=23241&proc_id=261&node_id=5&assignOrganize=&decision=5&assignUserId=' \
  -H 'Accept: application/json' \
  -H 'Accept-Language: en-US,en;q=0.9' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/json;charset=UTF-8' \
  -H $'Cookie: \'\'; \'\'=\'\'' \
  -H 'Origin: http://10.10.80.215:9089' \
  -H 'Pragma: no-cache' \
  -H 'Referer: http://10.10.80.215:9089/form-manage/proc-ins-manage/process-manage/new/261/0' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36' \
  -H 'combine-token: 5d7c6580-a061-4212-9520-3c5fb732beaa,6c1a189b-baf7-4b79-963b-825e48f6ae66' \
  --data-raw '[{"data":"XZ-261-241118-00009","formInstId":8985,"insNodeId":23241,"insProcId":6327,"itemId":"","itemKey":"sheetId","seqId":0,"seqName":"派发信息"},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"f8276a8b-2a32-4012-8cf0-f331027899c4","itemKey":"title","seqId":0,"seqName":"操作人信息","data":"{\"label\":\"网络质量-手机上网\",\"value\":\"104090101\",\"key\":\"104090101\"}"},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"69336b7a-7f3b-488a-a5db-16e02e0bcea7","itemKey":"operationUser","seqId":0,"seqName":"操作人信息","data":"rjp"},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"2550f8b8-26da-47fc-9b2a-76c5e3e96b4c","itemKey":"department","seqId":0,"seqName":"操作人信息","data":"西藏自治区移动公司"},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"a255ebf4-dcbf-484c-8e15-aa0fa6a320b2","itemKey":"telephone","seqId":0,"seqName":"操作人信息","data":"19768903234"},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"b8713750-0f6a-4c7e-b28b-414be062144d","itemKey":"sendTime","seqId":0,"seqName":"操作人信息","data":"2024-11-18 17:12:09"},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"21571da8-da04-4674-949c-4d65d190731a","itemKey":"acceptLimit","seqId":0,"seqName":"工单信息","data":"2024-11-19 17:12:09"},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"4fce4de4-cf50-4f94-b077-d95959bb75c9","itemKey":"finishLimit","seqId":0,"seqName":"工单信息","data":"2024-11-20 17:12:09"},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"13a7dddf-ab51-484a-a91a-c4b385358244","itemKey":"serialNo","seqId":0,"seqName":"工单信息","data":""},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"d2c4cb5e-b82e-4600-9675-1a1416bfa741","itemKey":"customPhone","seqId":0,"seqName":"工单信息","data":"12344556677"},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"a0590403-108a-4c7c-86d9-2b8333dd5a3d","itemKey":"registrationNo","seqId":0,"seqName":"工单信息","data":"1234455"},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"5b21399f-c161-4856-af84-6cfa62ba845e","itemKey":"registrationTime","seqId":0,"seqName":"工单信息","data":"2024-11-18 17:12:18"},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"ce225ef0-f12a-4548-b791-2b17c8361b07","itemKey":"problemNumber","seqId":0,"seqName":"工单信息","data":"13455667788"},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"9eea98d6-523f-4b99-8969-aefe25fcc71a","itemKey":"secondNumber","seqId":0,"seqName":"工单信息","data":"13566778899"},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"2615dfcc-6120-4f90-8f00-d4c939106a55","itemKey":"complaintArea","seqId":0,"seqName":"工单信息","data":""},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"f6e57565-6896-4016-ae39-8b1689533829","itemKey":"detailedLocation","seqId":0,"seqName":"工单信息","data":"{\"region\":\"re\",\"county\":\"fd\",\"street\":\"fd\",\"cell\":\"fd\",\"building\":\"34\",\"num\":\"12\"}"},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"02904303-c7a2-4f68-8612-b74364083f2e","itemKey":"complaintType1","seqId":0,"seqName":"工单信息","data":"{\"label\":\"移动业务\",\"value\":\"01\",\"key\":\"01\"}"},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"ca1972de-be76-47c6-934d-765dd1c01820","itemKey":"complaintType2","seqId":0,"seqName":"工单信息","data":"{\"label\":\"产品质量\",\"value\":\"0101\",\"key\":\"0101\"}"},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"94893404-0baa-4fa2-8808-39fc1868162f","itemKey":"complaintType3","seqId":0,"seqName":"工单信息","data":""},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"859ce0bb-fe59-4b7b-bc91-4c885accca65","itemKey":"complaintType4","seqId":0,"seqName":"工单信息","data":""},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"0ec8a95c-81da-4d70-a641-d27959691cc1","itemKey":"complaintType5","seqId":0,"seqName":"工单信息","data":""},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"78559758-f127-44de-a2b8-a96252407e4e","itemKey":"complaintType6","seqId":0,"seqName":"工单信息","data":""},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"b778bb9b-0418-4dc1-88b2-1e5309357dac","itemKey":"complaintType7","seqId":0,"seqName":"工单信息","data":""},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"dfc789a1-bf96-4c06-bb42-50690dffdf34","itemKey":"occurrenceTime","seqId":0,"seqName":"工单信息","data":"2024-11-18 17:12:49"},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"98ae6fed-d867-4313-9201-dd4b9a144a51","itemKey":"networkType","seqId":0,"seqName":"工单信息","data":"{\"label\":\"2G\",\"value\":\"1\",\"key\":\"1\"}"},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"1df34df9-3ce8-477d-af7d-7e1616e135d8","itemKey":"complaintScenario","seqId":0,"seqName":"工单信息","data":"{\"label\":\"室内\",\"value\":\"1\",\"key\":\"1\"}"},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"41d9b62b-b168-4eaf-a182-f1701920c682","itemKey":"surroundingInformation","seqId":0,"seqName":"工单信息","data":"{\"label\":\"一样情况\",\"value\":\"1\",\"key\":\"1\"}"},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"02eb3806-bc18-473f-9964-b986bdaefcc3","itemKey":"changeCardTest","seqId":0,"seqName":"工单信息","data":"{\"label\":\"是\",\"value\":\"1\",\"key\":\"1\"}"},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"faf2af4d-b591-487f-be3a-fb31ab0d12a1","itemKey":"repeatedComplaint","seqId":0,"seqName":"工单信息","data":"{\"label\":\"是\",\"value\":\"1\",\"key\":\"1\"}"},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"6f616bde-7422-4f0f-a95b-1f7db43a641a","itemKey":"escalationComplaint","seqId":0,"seqName":"工单信息","data":"{\"label\":\"是\",\"value\":\"1\",\"key\":\"1\"}"},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"3f4d28c6-070e-4bdf-9334-4c19dde7be10","itemKey":"starLevel","seqId":0,"seqName":"工单信息","data":"2"},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"ec16b667-bcd4-411a-83dd-fc60c7cc8457","itemKey":"feedbackInfo","seqId":0,"seqName":"工单信息","data":"e2e"},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"0acb3cc1-1920-4702-ad7a-3fa2b9cbe00a","itemKey":"processAttachment","seqId":0,"seqName":"工单信息","data":""},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"0b0fe97d-3f91-41d6-8ae4-7c0791f06828","itemKey":"changeCardResult","seqId":0,"seqName":"工单信息","data":"{\"label\":\"换机正常\",\"value\":\"1\",\"key\":\"1\"}"},{"formInstId":8985,"insProcId":6327,"insNodeId":23241,"itemId":"fd08a25a-8e98-4205-aadf-206645681da9","itemKey":"repeatedTimes","seqId":0,"seqName":"工单信息","data":"12"},{"data":"","formInstId":8985,"insNodeId":23241,"insProcId":6327,"itemId":"assignGroupId","itemKey":"assignGroupId","seqId":0,"seqName":"派发信息"},{"data":"","formInstId":8985,"insNodeId":23241,"insProcId":6327,"itemId":"assignUserId","itemKey":"assignUserId","seqId":0,"seqName":"派发信息"}]' \
  --insecure
        '''

        req = uncurl.parse_context(curl_command)

        response = requests.request(
            method=req.method,
            url=req.url,
            headers=req.headers,
            data=req.data,
            verify=False
        )

        print(response.json())


if __name__ == '__main__':
    monitor = __new_south_base__()
    monitor.__query_uncurl_commit__()